package com.example.k8s.hello.service.sys.api;

import com.example.k8s.hello.api.sys.UserApi;
import com.example.k8s.hello.bean.sys.query.SysUserKeyQuery;
import com.example.k8s.hello.service.sys.service.SysUserService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import org.springdoc.core.annotations.ParameterObject;
import org.springframework.context.annotation.Primary;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * 系统用户api
 *
 * @author Mark sunlightcs@gmail.com
 */
@Tag(name = "api-系统用户")
@RestController
@Primary
@RequestMapping("/sys/user")
@RequiredArgsConstructor
public class SysUserApi implements UserApi {
	private final SysUserService sysUserService;

	/**
	 * 用户ids查询
	 */
	@Operation(summary = "用户ids查询")
	@GetMapping("/user-ids")
	@Override
	public List<Long> queryUserIds(@ParameterObject SysUserKeyQuery query){
		return sysUserService.queryUserIds(query);
	}
	
}
